<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class FeelingToneComment extends Model
{
    protected  $table='feeling_tone_comment';

    protected $fillable = [
        'user_id',
        'feeling_id',
        'parent_id',
        'comment',
        'is_display',
    ];

    public function feeling() {
        return $this->belongsTo('App\Models\FeelingTone', 'feeling_id', 'id');
    }

    public function author() {
        return $this->belongsTo('App\User', 'user_id', 'id');
    }

    public function post() {
        return $this->belongsTo('App\Models\FeelingTone', 'feeling_id', 'id');
    }
}
